package com.macrounion.atv.service.dto.resp;

import com.macrounion.atv.service.entity.ProtocolC;
import com.macrounion.base.service.dto.PageRespDto;

public class SmartInsertRespDto {
    private String msg;
    private PageRespDto<ProtocolC> data;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public PageRespDto<ProtocolC> getData() {
        return data;
    }

    public void setData(PageRespDto<ProtocolC> data) {
        this.data = data;
    }

    public static SmartInsertRespDto success(PageRespDto<ProtocolC> data){
        SmartInsertRespDto respDto = new SmartInsertRespDto();
        respDto.setData(data);
        respDto.setMsg("success");
        return respDto;
    }

    public static SmartInsertRespDto fail(String msg){
        SmartInsertRespDto respDto = new SmartInsertRespDto();
        respDto.setMsg(msg);
        respDto.setData(new PageRespDto<>());
        return respDto;
    }
}
